Skip to content

[pull] master from mattermost:master#740

Merged
pull[bot] merged 5 commits into
code:masterfrom
mattermost:master
May 29, 2026
Merged

[pull] master from mattermost:master#740
pull[bot] merged 5 commits into
code:masterfrom
mattermost:master

Conversation

@pull

@pull pull Bot commented May 29, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

cursor Bot and others added 5 commits May 29, 2026 08:53
* Fix flaky TestUpdatePropertyValues_WriteAccessControl

GetPropertyValues delegates to PropertyValueStore.GetMany, which does not
preserve the caller's ID slice order. Subtests asserted on retrieved[0] and
retrieved[1] by position, so a planner that returns rows sorted by ID or
UpdateAt (e.g. with idx_propertyvalues_groupid_updateat_id) could swap
values and fail intermittently.

Look up returned values by ID before comparing JSON payloads.

Tests-only change. Verified with `go test -run '^TestUpdatePropertyValues_WriteAccessControl$' -race -count=100` locally.

Co-authored-by: mattermost-code <matty-code@mattermost.com>

* Refactor property value test helper

Co-authored-by: Miguel de la Cruz <mgdelacroix@users.noreply.github.com>

* Remove redundant property test nil checks

Co-authored-by: Miguel de la Cruz <mgdelacroix@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: mattermost-code <matty-code@mattermost.com>
Co-authored-by: Miguel de la Cruz <mgdelacroix@users.noreply.github.com>
)

* MM-68978 - Harden ABAC masking guards and fix sentinel detection

* address pr feedback

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
The subtest used a fixed sleep before asserting callback counts, but
job.run waits until runAt plus up to scheduleOnceJitter. Under the race
detector or loaded CI that window can elapse after the sleep, so
newCount3 is still 0 and the assertion flakes.

Poll with require.Eventually (same approach as the paging subtest in
#35891) so the test waits for the scheduled callback without weakening
assertions.

Tests-only change. Verified with:
go test -run '^TestScheduleOnceSequential$/adding_two_callback_works' \
  -race -count=100 ./pluginapi/cluster/... (from server/public)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: mattermost-code <matty-code@mattermost.com>
* Unblock session attributes from simulation

* lint
Integrity checks scan the full database for orphaned channels, so
parallel sqlstore tests and leftover rows from sibling subtests can
inflate global record counts and flip index-based assertions.

Reset tables at test start and scope assertions to child IDs created
in each subtest. Use ElementsMatch for the two-record direct-channel
case so merge order cannot flake.

Tests-only change. Verified with `go test -run '^TestCheckTeamsChannelsIntegrity$' -race -count=100` locally.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: mattermost-code <matty-code@mattermost.com>
@pull pull Bot locked and limited conversation to collaborators May 29, 2026
@pull pull Bot added the ⤵️ pull label May 29, 2026
@pull pull Bot merged commit 9fdcad4 into code:master May 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants